Method and apparatus for on-demand power management

ABSTRACT

A method for on-demand power management monitors a processing demand in a processing system operating at a first set of voltages and frequencies and generates a second set of voltages and frequencies in response to the processing demand. The method switches from the first set of voltages and frequencies to the second set of voltages and frequencies without halting the processing system.

RELATED APPLICATION

This is a divisional application of application Ser. No. 11/019,804,filed Dec. 21, 2004, now U.S. Pat. No. 7,337,335 which is herebyincorporated by reference.

TECHNICAL FIELD

The present invention relates generally to power management and inparticular to managing voltages and frequencies in response toapplication processing demands.

BACKGROUND

As digital electronic processing systems trend toward higher operatingfrequencies and smaller device geometries, power management has becomeincreasingly important to prevent thermal overload while maintainingsystem performance and prolonging battery life in portable systems.

The two principal sources of power dissipation in digital logic circuitsare static power dissipation and dynamic power dissipation. Static powerdissipation is dependent on temperature, device technology andprocessing variables, and is composed primarily of leakage currents.Dynamic power dissipation is the predominant loss factor in digitalcircuitry and is proportional to the operating clock frequency, thesquare of the operating voltage and the capacitive load. Capacitive loadis highly dependent on device technology and processing variables, somost approaches to dynamic power management focus on frequency andvoltage control.

One conventional approach to power management halts the processingsystem to adjust core clock frequencies and voltages, during which timethe processor does not execute operating system code or applicationcode, and then restarts the system after the new frequencies andvoltages have stabilized. Such an approach is described in U.S. Pat. No.6,754,837, as illustrated in FIG. 1. FIG. 1 illustrates a processor orprocessing system 1 contains a programmable voltage ID (VID) register 3,a clock frequency control register 4 and a count register 5. When theprocessor determines that a change in the voltage and/or frequency isdesired, the desired voltage and frequency control information is loadedinto the VID register and the clock frequency control register,respectively. Access to those registers triggers a stop request 9 to theCPU core logic 11. In response to the stop request, the CPU completesthe current instruction and issues a stop grant signal 13 to indicate toa power controller 7 that processing has stopped. The stop grant stateis maintained, for a time determined by a value in the count register,while the voltage and/or frequency are changed and stabilized. Inaddition to the processing time lost during the stop grant state, thisapproach may also result in large transient power surges when theprocessor restarts.

Another conventional approach to power management, described in U.S.Pat. No. 6,788,156, changes the clock frequency of a processor while theprocessor is operating, but requires the frequency changes to be made insmall increments to avoid processing errors that large frequency stepswould cause. As a result, this approach may require a significant timeperiod to achieve a desired operating frequency.

Yet another conventional approach to power management, described in U.S.Pat. No. 6,778,418, employs a fixed relationship between voltage andfrequency, either through a lookup table or by use of a frequency tovoltage converter. In this approach, a frequency increase is alwayspreceded by a voltage increase and a frequency decrease always precedesa voltage decrease. In addition, a frequency increase is delayed whilethe voltage is ramped up to a corresponding voltage. The new frequencyand voltage are not scaled independently, and the new operating pointmay not be optimum with respect to an application's processing demand.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not oflimitation, in the figures of the accompanying drawings in which:

FIG. 1 illustrates a conventional power management system;

FIG. 2A illustrates one embodiment of on-demand power management in aprocessing system;

FIG. 2B illustrates one embodiment of on-demand power management in adistributed processing system;

FIG. 2C illustrates one embodiment of an on-demand power manager;

FIG. 3 illustrates a compensation engine in one embodiment of on-demandpower management;

FIG. 4 illustrates a power distribution manager in one embodiment ofon-demand power management;

FIG. 5 illustrates a clock domain manager in one embodiment of on-demandpower management;

FIG. 6 illustrates one embodiment of phase-matching in on-demand powermanagement; and

FIG. 7 is a state diagram illustrating one embodiment of on-demand powermanagement;

FIG. 8 illustrates voltage and frequency control in one embodiment ofon-demand power management;

FIG. 9A illustrates a method in one embodiment of on-demand powermanagement;

FIG. 9B illustrates one embodiment of the method illustrated by FIG. 9A;

FIG. 9C illustrates a further embodiment of the method illustrated byFIG. 9A; and

FIG. 9D illustrates another further embodiment of the method illustratedby FIG. 9A.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forthsuch as examples of specific components, devices, methods, etc., inorder to provide a thorough understanding of embodiments of the presentinvention. It will be apparent, however, to one skilled in the art thatthese specific details need not be employed to practice embodiments ofthe present invention. In other instances, well-known materials ormethods have not been described in detail in order to avoidunnecessarily obscuring embodiments of the present invention. It shouldbe noted that the “line” or “lines” discussed herein, that connectelements, may be single lines or multiple lines. The term “coupled” asused herein, may mean directly coupled or indirectly coupled through oneor more intervening components. It will also be understood by one havingordinary skill in the art that lines and/or other coupling elements maybe identified by the nature of the signals they carry (e.g., a “clockline” may implicitly carry a “clock signal”) and that input and outputports may be identified by the nature of the signals they receive ortransmit (e.g., “clock input” may implicitly receive a “clock signal”).

A method and apparatus for on-demand power management is described. Inone embodiment, the method includes monitoring a processing demand in aprocessing system operating at a first one or more voltages and a firstone or more clock frequencies phase-locked to a reference frequency. Themethod also includes generating a second one or more clock frequenciesin response to the processing demand, wherein the second one or moreclock frequencies is phase-locked to the reference frequency andphase-matched to the first one or more clock frequencies. The methodalso includes switching from the first one or more clock frequencies tothe second one or more clock frequencies without halting the processingsystem. In one embodiment, the method further includes generating asecond one or more voltages in response to the processing demand, andswitching from the first one or more voltages to the second one or morevoltages without halting the processing system.

In one embodiment, the apparatus includes a system controller to monitoran application processing demand on a processing system and to determineone or more clock frequencies and one or more voltages at which theprocessing system operates. The apparatus also includes a powerdistribution manger, coupled with the system controller, to provide oneor more operating voltages to the processing system and to switchbetween a first one or more voltages and a second one or more voltageswithout halting the processing system. The apparatus also includes aclock domain manager, coupled with the system controller, to provide oneor more clock signals to the processing system and to switch between afirst one or more clock frequencies and a second one or more clockfrequencies without halting the processing system. The first one or moreclock frequencies and the second one or more clock frequencies arephase-locked to a common reference frequency and the second one or moreclock frequencies are phase-matched to the first one or more clockfrequencies. In one embodiment, the apparatus also includes acompensation engine coupled with the system controller, the powerdistribution manager and the clock domain manager, to receive voltageand frequency commands from the system controller and to compensate thevoltage and frequency commands for temperature and processing variables.

FIG. 2A illustrates one embodiment of on-demand power management in aprocessing system 100. Processing system 100 may include a systemprocessor 101, which may be a general-purpose processing device such asa microprocessor or central processing unit, or the like. Alternatively,system processor 101 may also be a special-purpose processing devicesuch as an application specific integrated circuit (ASIC), a fieldprogrammable gate array (FPGA), a digital signal processor (DSP) or thelike. System processor 101 may also be any combination of ageneral-purpose processing device and a special-purpose processingdevice. System processor 101 may be coupled to a system bus 102 whichmay carry system data and commands to and from system processor 101.System bus 102 may be coupled to memory 103 which may store programs anddata. Memory 103 may be any type of memory, including, but not limitedto, random access memory (RAM) and read only memory (ROM). System bus102 may also be coupled with peripherals 104-1 through 104-k to carrysystem commands and data to and from peripherals 104-1 through 104-k.

Processing system 100 may also include power manager 105, which may becoupled to system bus 102, frequency source 108 and voltage source 109.Power manager 105 may also be coupled to system processor 101 andperipherals 104-1 through 104-k via a clock bus 106 and voltage bus 107.In one embodiment, as illustrated in FIG. 2 a, power manager 105 may becoupled to an external frequency source 108. Power manager 105 may becapable of converting a reference frequency f₀ from frequency source 108into one or more clock frequencies f₁ through f_(m), phase-locked toreference frequency f₀, to provide clock signals to system processor 101and peripherals 104-1 through 104-k. In other embodiments, frequencysource 108 may be integrated with power manager 105 and reside withpower manager 105 on a common carrier substrate such as, for example, anintegrated circuit (IC) die substrate, a multi-chip module substrate, orthe like. Power manager 105 may also be capable of converting a voltageV₀ from voltage source 109 into one or more operating voltages V₁through V_(n) to provide voltages to system processor 101 andperipherals 104-1 through 104-k. In the embodiment illustrated in FIG. 2a, each of system processor 101 and peripherals 104-1 through 104-k areshown to have one voltage input and one clock input such that m=n=k+1.It will be appreciated that in other embodiments, any of systemprocessor 101 and peripherals 104-1 through 104-k may require more thanone operating voltage and/or more than one clock signal. In oneembodiment, two or more of system processor 101, memory 103, powermanager 105, frequency source 108 and peripherals 104-1 through 104-kmay reside on a common carrier substrate, for example, a printed circuitboard (PCB) such as motherboard 110 illustrated in FIG. 2B, a daughterboard 111 in FIG. 2B, or a line card. Alternatively, the common carriersubstrate on which the two or more of system processor 101, memory 103,power manager 105, frequency source 108 and peripherals 104-1 through104-k may reside can be an integrated circuit (IC) die substrate.

With reference to FIG. 2B, peripherals 104-1 through 104-k may be anytype of device, component, circuit, subsystem or system capable ofcommunicating with system processor 101 via system bus 102. For example,any of peripheral devices 104-1 through 104-k may be a single chipdevice 112 such as a system on a chip, an ASIC, an FPGA, a memory chipor like device. Any of peripherals 104-1 through 104-k may also be amulti-chip module 113 including any combination of single chip deviceson a common integrated circuit substrate. Alternatively, peripherals104-1 through 104-k may reside on one or more printed circuit boardssuch as, for example, a mother board 110, a daughter board 114 or othertype of circuit card.

FIG. 2C illustrates a power manager 105 in one embodiment of on-demandpower management. Power manager 105 may include a system controller 201to monitor the application processing demand in processing system 100and to select an operating point for processing system 100. Powermanager 105 may also include a power distribution manager 202, coupledwith the system controller 201, to provide the one or more operatingvoltages V₁-V_(n) to processing system 100 and to switch between a firstone or more voltages V₁′-V_(n)′ and a second one or more voltagesV₁″-V_(n)″ without halting processing system 100 as described below.Power manager 105 may also include a clock domain manager 203, coupledwith system controller 201, to provide one or more clock signalsf₁-f_(m) to processing system 100 and to switch between a first one ormore clock signals f₁′-f_(m)′ and a second one or more clock signalsf₁″-f_(m)″ without halting processing system 100 as described below. Inone embodiment, power manager 105 may also include a compensation engine204 coupled with system controller 201, power distribution manager 202and clock domain manager 203. Compensation engine 204 may be configuredto compensate the operating point selected by system controller 201 fortemperature and process variables as described in detail below.

In one embodiment, power manager 105 may be configured to monitorprocessing activity on system bus 102 while supplying the first one ormore clock frequencies f₁′-f_(m)′ and the first one or more voltagesV₁′-V_(n)′ to system processor 101 and peripherals 104-1 through 104-k.Power manager 105 may also be configured to determine a processingdemand based on the monitored processing activity and to generate thesecond one or more clock frequencies f₁″-f_(m)″ and the second one ormore voltages V₁″-V_(n)″ in response to the processing demand. Powermanager 105 may also be configured to switch from the first one or morevoltages to the second one or more voltages without halting theprocessing system 100, and to switch from the first one or more clockfrequencies to the second one or more clock frequencies without haltingthe processing system 100.

System controller 201 may include a bus interface unit 205 to monitorprocessing activity on system bus 102 and to select a new operatingpoint for the processing system 100. System controller 201 may alsoinclude a programmable memory 206 coupled with the bus interface unit205. Programmable memory 206 may include programmed information toenable the bus interface unit 205 to correlate activity on the systembus 102 with the application processing demand in processing system 100.

In one embodiment, bus interface unit 205 may be configured to detect aplurality of commands on the system bus 102 and to recognize a commandpattern, programmed in programmable memory 206, associated with a changein the application processing demand. The command pattern may be ageneric processing command pattern, or a command pattern and bustransaction cycles associated with a specific system processor 101 or aprocessor family of which system processor 101 may be a member. Inresponse to recognizing the command pattern, bus interface unit 205 mayselect the new operating point for the processing system 100. The newoperating point may include a new set of operating voltages V₁″-V_(n)″which are different from a current set of operating voltages V₁′-V_(n)″,and/or a new set of clock frequencies f₁″-f_(m)″ which are differentfrom a current set of operating clock frequencies f₁′-f_(m)′ In oneembodiment, the current sets of operating voltages and clock frequenciesand the new sets of operating voltages and clock frequencies may bewritten to hardware registers (not shown) within system controller 201or software defined registers (e.g., memory locations in programmablememory 206).

Alternatively, bus interface unit 205 may be configured to detect anaverage number of processing events per unit time on system bus 102 andto compare the average number of processing events with one or morecurrent clock frequencies 112. Based on the comparison, bus interfaceunit 205 may select a new operating point as described above.

As described in greater detail below, system controller 201 may alsoinclude a state machine 207, coupled with the bus interface unit 206 anda command bus 208, to control the provision of voltages V₁-V_(n) in thepower distribution manager 202 and the provision of clock frequenciesf₁-f_(m) in the clock domain manager 203.

It will be appreciated by one having ordinary skill in the art thatsystem controller 201 may be configured to automatically monitor theprocessing activity on system bus 102 and to and autonomously commandthe one or more voltages V₁-V_(n) and the one or more clock frequenciesf₁-f_(m) to select a new operating point as the application processingdemand in processing system 100 changes. However, system controller 201may also include a command interrupt line 209, coupled with statemachine 207, to override the automatic control of the one or morevoltages V₁-V_(n) and the one or more clock frequencies f₁-f_(m) (e.g.,in response to a critical power demand from the system processor 101 orone or more of peripherals 104-1 through 104-n). Command interrupt line209 may be used to set processing system 100 to a predeterminedoperating point wherein the system controller 201 commands the powerdistribution manager 202 to provide one or more predetermined voltagesto the processing system 100 and wherein the system controller commandsthe clock domain manager to provide one or more predetermined clockfrequencies to the processing system 100.

FIG. 3 illustrates a compensation engine 204 in one embodiment ofon-demand power management. Compensation engine 204 may include areceiver 301 to receive one or more voltage commands and one or morefrequency commands from system controller 201 which are selected bysystem controller 201 to change the operating point of system 100 inresponse to the application processing demand. The voltage and frequencycommands received by receiver 301 may be digital commands. Compensationengine 204 may also include a temperature sensor 302 to measure andreport a temperature which may be, for example, a device temperature, asystem temperature, an ambient temperature or any temperature which mayhave an effect on the operating point of processing system 100.Compensation engine 204 may also include a non-volatile memory 303,coupled with temperature sensor 302, to store calibration data forprocessing system 100. The calibration data stored in non-volatilememory 303 may contain temperature dependent voltage and frequencycorrection factors for a device or system processing technology (e.g.,CMOS processes) or one or more individual devices such as systemprocessor 101 and peripherals 104-1 through 104-k. Compensation engine204 may also include a compensation module 304 which may be coupled withreceiver 301, temperature sensor 302 and non-volatile memory 303.Compensation module 304 may be configured to compensate voltage andfrequency commands from receiver 301 for temperature, and temperaturedependent processing and device variables. Compensation module 304 maybe coupled with a scaling circuit 305 to provide one or more scaledvoltage commands to the power distribution manager 202 and one or morescaled frequency commands to the clock domain manager 203 via commandbus 306.

FIG. 4 illustrates a power distribution manager 202 in one embodiment ofon-demand power management. Power distribution manager 202 may includeone or more voltage control channels 401-1 through 401-n correspondingto one or more operating voltages V₁-V_(n). Each voltage control channel401-1 through 401-n may include a dual voltage regulator 403 coupledbetween a ping-pong controller 402 and a multiplexer 404. The ping-pongcontroller may receive commands from the state machine 207 in systemcontroller 201, through compensation engine 204, via command bus 306.The ping-pong controller 402 may set a first voltage regulator 403 a toa first voltage, a second voltage regulator 403 b to a second voltage,and select between the first voltage and the second voltage in responseto voltage commands from state machine 207. For example, in voltagecontrol channel 401-1, voltage regulator 403 a may be set to a firstvoltage V₁′ and voltage regulator 403 b may be set to a second voltageV₁″. Power distribution manager 202 may also include a sequencecontroller 405, controlled by the system controller 201, to sequence thetransitions between the first one or more voltages V₁′-V_(n)′ and asecond one or more voltages V₁″-V_(n)″ in order to manage transientpower demands. It will be appreciated that because the voltage changesdescribed above may be made independently of any frequency changes, thevoltages may be switched without halting the processing system 100.

FIG. 5 illustrates a clock domain manager 203 in one embodiment ofon-demand power management. Clock domain manager 203 may include one ormore frequency control channels 501-1 through 501-m corresponding to oneor more clock signals f1-fm. Each frequency control channel 501-1through 501-m may include a dual phase-locked loop (PLL) 503 coupledbetween a ping-pong controller 502 and a multiplexer 504. The ping-pongcontroller may receive commands from the state machine 207 in systemcontroller 201, through compensation engine 204, via command bus 306.The ping-pong controller 502 may set a first PLL 503 a to a first clockfrequency, a second PLL 503 b to a second clock frequency, and selectbetween the first clock frequency and the second clock frequency inresponse to frequency commands from state machine 207. For example, infrequency control channel 501-1, PLL 503 a may be set to a first clockfrequency f₁′ and PLL 503 b may be set to a second clock frequency f₁″.Each PLL 503 a and 503 b may be phase-locked to the reference frequency110 from frequency source 108 (not shown), such that the clockfrequencies provide by PLL's 503 a and 503 b are all multiples orsub-multiples of the reference frequency 110. Frequency multiplyingPLL's and frequency dividing PLL's are known in the art and will not bediscussed in detail here. Clock domain manger 203 may also include ajitter and phase controller 505, controlled by the system controller201, to adjust for differential propagation delays among clockfrequencies f₁-f_(m) and to control the combined spectral content of theclock frequencies f₁-f_(m).

It will be appreciated by one of ordinary skill in the art that allclock frequencies f1-fm will be harmonically related because all arephase-locked to the common reference frequency 110. In particular, anytwo clock frequencies in a single frequency control channel (e.g., clockfrequencies f₁′ and f₁″ in frequency control channel 501-1) will beharmonically related. FIG. 6 illustrates how this harmonic relationshipmay be used to switch between a first clock frequency and a second clockfrequency without halting the processing system 100. FIG. 6 depictsreference frequency 110 having frequency f₀ and period T₀ a=1/f₀, clockfrequency f₁′=Af₀ and period T₁=T₀/A, and frequency f₁″=Bf₀ and periodT₂=T₀/B. As shown in FIG. 6, the phase of clock frequency f₁′ willperiodically align with the phase of clock frequency f1″ (e.g., at timest₁, t₂, t₃, etc.) at time intervals corresponding to the lowest commonmultiples of T₁ and T₂. This time interval may be calculated, forexample, by system controller 201. Therefore, when a new operating pointis commanded by the system controller in response to an applicationprocessing demand, the switch from the first clock frequency (e.g., f₁′)to the second clock frequency (e.g., f₁″) may be timed to occur when thephases of the first clock frequency and the second clock frequency arealigned. If the phases of the first clock frequency and the second clockfrequency are aligned when the frequencies are switched (e.g., by amultiplexer 504), there is no phase discontinuity in the processingsystem 100 and the frequencies may be switched without halting theprocessing system 100. The ratio of the second clock frequency to thefirst clock frequency may be very large, approximately up to six ordersof magnitude depending on the stability of the reference frequency 109.

As noted above, the ping-pong controllers 402 in the power distributionmanager 202 may receive commands from state machine 207 in systemcontroller 201 to control the dual voltage regulators 403, and theping-pong controllers 502 in the clock domain manger 203 may receivecommands from the state machine 207 in the system controller 201 tocontrol the dual PLL's 503. FIG. 7 illustrates a state diagram for statemachine 207 in one embodiment of on-demand power management for theexemplary voltage control channel 401-1 (where the dual voltageregulators 403 a and 403 b are designated as VR₁ and VR₂, respectively)and the exemplary frequency control channel 501-1 (where the dual PLL's503 a and 503 b are designated as PLL₁ and PLL₂, respectively), as shownin FIG. 8. It will be appreciated that a state diagram, such as thestate diagram in FIG. 7 may be applied to each voltage control channelin power distribution manager 202 and each frequency control channel inclock domain manager 203.

In one embodiment, when a new operating voltage and/or a new clockfrequency is commanded by the system controller, state machine 207 mayoperate in a ping-pong mode or a steady-state mode. Ping-pong mode is asymmetric mode where a new steady-state operating voltage is providedalternately by VR₁ and VR₂ with each change, and where the newsteady-state clock frequency is provided alternately by PLL₁ and PLL₂with each change. Steady-state mode is an asymmetrical mode where a newsteady-state voltage is always provided by one voltage regulator (e.g.,VR₁) after a transient change is provided by the other voltage regulator(e.g., VR₂) and where a new steady-state clock frequency is alwaysprovided by one PLL (e.g., PLL₁) after a transient change is provided bythe other PLL (e.g., PLL₂). Table 1 defines the state variables used inFIG. 7 and in the following description.

TABLE 1 State Variable Cleared Name Function Set (value = 1) (value = 0)cmd_fc frequency change change frequency do not change command frequencycmd_vc voltage change change voltage do not change command voltagechk_st check stability stable not stable mode_pp ping-pong modeping-pong mode on ping-pong mode off mode_ss steady-state modesteady-state mode on steady-state mode off

In an initial state (701), VR₁ is set to a first voltage, which isselected by multiplexer 404 and provided to processing system 100. Inthe initial state PLL₁ is set to a first clock frequency, which isselected by multiplexer 504 and provided to processing system 100. Businterface unit 205 periodically checks the system bus 102 for processingactivity. If bus interface unit 205 does not detect a change inprocessing activity, the change frequency flag is cleared (cmd_fc=0) andthe change voltage flag is cleared (cmd_vc=0). If bus interface unit 205detects a change in processing activity on system bus 102 that warrantsa change in the operating point of processing system 100, bus interfaceunit 205 will select the new operating point from programmable memory206, which may require a new voltage and/or new clock frequency.

If a new voltage is required (cmd_vc=1), VR₂ is commanded to the newvoltage (702). After the new voltage is stabilized (chk_st=1), theoutput of VR₂ is selected (703). In ping-pong mode (mode_pp=1), VR₂continues to be selected while the voltage requirement does not change(cmd_vc=0). If the voltage requirement changes (cmd_vc=1), VR₁ iscommanded to the new voltage (704 a). After the new voltage isstabilized (chk_st=1), the output of VR₁ is selected (705) and thesystem returns to the initial state with the new voltage. Insteady-state mode (mode_ss=1) at 703, the output of VR₁ is commanded toequal the output of VR₂ (704 b) and the output of VR₁ is selected (705)when VR₁ is stabilized (chk_st=1) and the system returns to the initialstate with the new voltage.

If a new clock frequency is required (cmd_fc=1), PLL₂ is commanded tothe new frequency (706). After the new frequency is stabilized(chk_st=1), the output of PLL₂ is selected (707). In ping-pong mode(mode_pp=1), PLL₂ continues to be selected while the frequencyrequirement does not change (cmd_fc=0). If the frequency requirementchanges (cmd_fc=1), PLL₁ is commanded to the new frequency (708 a).After the new frequency is stabilized (chk_st=1), the output of PLL₁ isselected (709) and the system returns to the initial state (701) withthe new frequency. In steady-state mode (mode_ss=1) at 707, the outputof PLL₁ is commanded to equal the output of PLL₂ (708 b) and the outputof PLL₁ is selected (709) when PLL₁ is stabilized (chk_St=1) and thesystem returns to the initial state (701) with the new frequency.

FIG. 9A illustrates one embodiment of a method 900 for on-demand powermanagement. With reference to FIGS. 1 through 4, the method may include:monitoring a processing demand in processing system 100 operating at afirst one or more voltages 113 and a first one or more clock frequencies112 phase-locked to a reference frequency 110 (step 910); generating asecond one or more clock frequencies 112 in response to the processingdemand, the second one or more clock frequencies 112 phase-locked to thereference frequency 109 and phase-matched to the first one or more clockfrequencies 112 (step 920); generating a second one or more voltages 113in response to the processing demand (step 930); switching from thefirst one or more voltages 110 to the second one or more voltages 113without halting the processing system 100 (step 940); and switching fromthe first one or more clock frequencies 112 to the second one or moreclock frequencies 112 without halting the processing system 100 (step950).

In one embodiment, as illustrated in FIG. 9B, monitoring the processingdemand (step 910) may include: detecting a plurality of processingevents on a system bus 102 with a bus interface unit 205 (step 911); andcorrelating a clock frequency requirement with the plurality ofprocessing events (step 912).

In one embodiment, as illustrated in FIG. 9C, generating the second oneor more clock frequencies 111 in response to the processing demand (step920) may include: determining values for the second one or more clockfrequencies 112 from the processing demand (step 921); scaling thevalues of the second one or more clock frequencies in a compensationengine 204 to compensate for a system temperature and a processingvariable (step 922); synthesizing the scaled values of the second one ormore clock frequencies 112 in one or more dual phase-locked loops 503(step 923); and stabilizing the scaled values of the second one or moreclock frequencies 112 before switching from the first one or more clockfrequencies 112 to the second one or more clock frequencies 112 with oneor more multiplexers 504.

In one embodiment, as illustrated in FIG. 9D, generating the second oneor more voltages 113 in response to the processing demand (step 930) mayinclude: determining values for the second one or more voltages 113 fromthe processing demand (step 931); scaling the values of the second oneor more voltages 113 in a compensation engine 204 to compensate for asystem temperature and a processing variable (step 932); setting thescaled values of the second one or more voltages 113 in one or more dualvoltage regulators 403 (step 933); and stabilizing the scaled values ofthe second one or more voltages 113 before switching from the first oneor more voltages 113 to the second one or more voltages 113 with one ormore multiplexers 404.

Thus, a method and apparatus for on-demand power management has beendescribed. It will be apparent from the foregoing description thataspects of the present invention may be embodied, at least in part, insoftware. That is, the techniques may be carried out in a computersystem or other data processing system in response to its processor,such as system controller 201, executing sequences of instructionscontained in a memory, such as programmable memory 206. In variousembodiments, hardwired circuitry may be used in combination withsoftware instructions to implement the present invention. Thus, thetechniques are not limited to any specific combination of hardwarecircuitry and software or to any particular source for the instructionsexecuted by the data processing system. In addition, throughout thisdescription, various functions and operations may be described as beingperformed by or caused by software code to simplify description.However, those skilled in the art will recognize what is meant by suchexpressions is that the functions result from execution of the code by aprocessor or controller, such as system controller 201.

A machine-readable medium can be used to store software and data whichwhen executed by a data processing system causes the system to performvarious methods of the present invention. This executable software anddata may be stored in various places including, for example, memory 103and programmable memory 206 or any other device that is capable ofstoring software programs and/or data.

Thus, a machine-readable medium includes any mechanism that provides(i.e., stores and/or transmits) information in a form accessible by amachine (e.g., a computer, network device, personal digital assistant,manufacturing tool, any device with a set of one or more processors,etc.). For example, a machine-readable storage medium includesrecordable/non-recordable media (e.g., read only memory (ROM); randomaccess memory (RAM); magnetic disk storage media; optical storage media;flash memory devices; etc.); etc.

It should be appreciated that references throughout this specificationto “one embodiment” or “an embodiment” means that a particular feature,structure or characteristic described in connection with the embodimentis included in at least one embodiment of the present invention.Therefore, it is emphasized and should be appreciated that two or morereferences to “an embodiment” or “one embodiment” or “an alternativeembodiment” in various portions of this specification are notnecessarily all referring to the same embodiment. Furthermore, theparticular features, structures or characteristics may be combined assuitable in one or more embodiments of the invention. In addition, whilethe invention has been described in terms of several embodiments, thoseskilled in the art will recognize that the invention is not limited tothe embodiments described. The embodiments of the invention can bepracticed with modification and alteration within the scope of theappended claims. The specification and the drawings are thus to beregarded as illustrative instead of limiting on the invention.

1. A method, comprising: providing a first plurality of voltages to aprocessing system; generating a second plurality of voltages in responseto a change in an application processing demand in the processingsystem; generating one or more control signals to adjust for the changein the application processing demand; and in response to the one or morecontrol signals, switching from each of the first plurality of voltagesto each of the second plurality of voltages in a sequence withouthalting the processing system, wherein the sequence minimizes atransient power surge.
 2. The method of claim 1, further comprising:determining the change in the application processing demand in theprocessing system.
 3. The method of claim 2, wherein determining thechange in the application processing demand comprises: detecting aplurality of processing events on a system bus; recognizing a processingevent pattern; and correlating the processing event pattern with theapplication processing demand.
 4. The method of claim 1, whereingenerating the second plurality of voltages comprises: determiningvalues for the second plurality of voltages based on the change in theapplication processing demand; scaling the values of the secondplurality of voltages to compensate for at least one of a processingsystem temperature and a processing variable of the processing system;synthesizing the scaled values of the second plurality of voltages; andstabilizing the scaled values of the second plurality of voltages beforethe switching.
 5. The method of claim 1, further comprising: providing afirst plurality of frequencies to the processing system; generating asecond plurality of frequencies in response to a change in theapplication processing demand in the processing system; generating oneor more control signals to adjust for the change in the applicationprocessing demand; and in response to the one or more control signals,switching from each of the first plurality of frequencies to each of thesecond plurality of frequencies in a sequence without halting theprocessing system.
 6. The method of claim 5, wherein generating thesecond plurality of frequencies comprises: determining values for thesecond plurality of frequencies based on the change in the applicationprocessing demand; scaling the values of the second plurality offrequencies to compensate for at least one of a processing systemtemperature and a processing variable of the processing system;synthesizing the scaled values of the second plurality of frequencies;and stabilizing the scaled values of the second plurality of frequenciesbefore the switching.
 7. An apparatus, comprising: a system controllerto monitor a change in an application processing demand in a processingsystem, the system controller comprising a state machine to generate oneor more control signals to adjust for a change in the applicationprocessing demand; and a power distribution manager coupled to thesystem controller to provide a first plurality of voltages to theprocessing system, the power distribution manager including a sequencecontroller to receive the one or more control signals from the systemcontroller, and to switch from each of the first plurality of voltagesto each of a second plurality of voltages in a sequence without haltingthe processing system, wherein the sequence minimizes a transient powersurge.
 8. The apparatus of claim 7, wherein the one or more controlsignals comprise at least one or voltage commands and frequencycommands.
 9. The apparatus of claim 7, further comprising a compensationengine coupled between the system controller and the power distributionmanager, wherein the one or more control signals are received by thepower distribution manager through the compensation engine.
 10. Theapparatus of claim 9, wherein the compensation engine is configured toreceive the one or more controls signals from the system controller andprovide one or more scaled control signals to the power distributionmanager.
 11. The apparatus of claim 10, wherein the one or more scaledcontrol signals comprise one or more scaled frequency commands and oneor more scaled voltage commands.
 12. The apparatus of claim 11, furthercomprising a clock domain manager coupled to the compensation engine,wherein the compensation engine is configured to provide the one or morescaled voltage commands to the power distribution manager and the one ormore scaled frequency commands to the clock domain manager.
 13. Theapparatus of claim 12, wherein the clock domain manager is configured toreceive the one or more scaled frequency commands and to switch fromeach of a first plurality of frequencies to each of a second pluralityof frequencies in a sequence, without halting the processing system. 14.The apparatus of claim 11, wherein the compensation engine comprises: areceiver; a compensation module coupled to the receiver to receive theone or more control signals from the system controller; a sensor coupledto the compensation module; and a memory coupled to the compensationmodule and the sensor, the memory to store calibration data, wherein thecompensation module is configured to generate the one or more scaledvoltage commands and the one or more scaled frequency commands using thecalibration data.
 15. The apparatus of claim 14, wherein the sensor is atemperature sensor and the calibration data comprises temperaturedependent voltage and frequency correction factors.
 16. The apparatus ofclaim 15, wherein the temperature sensor monitors at least one of adevice temperature, a system temperature, an ambient temperature. 17.The apparatus of claim 15, wherein the temperature dependent voltage andfrequency correction factors are based on a device of the processingsystem being supplied the second plurality of voltages.
 18. Theapparatus of claim 15, wherein the temperature dependent voltage andfrequency correction factors are based on a process technology of thedevice of the processing system.
 19. The apparatus of claim 18, whereinthe device is a peripheral.
 20. The apparatus of claim 18, wherein thedevice is a processor.
 21. A machine readable storage medium havinginstructions stored thereon that, when executed by a processing system,cause the processing system to perform the method of claim 1.